[%
<wizard>
	<page>
		<title>Select data type for the keys</title>
		<description>Select data type for the key values of the dictionary
					 (for value types, remember to use a pointer, e.g. "String *")</description>
		<variable name="key_datatype"/>
	</page>	
	<page>
		<title>Select data type for the values</title>
		<description>Select data type for the values of the dictionary
					 (for value types, remember to use a pointer, e.g. "String *")</description>
		<variable name="value_datatype"/>
	</page>	
</wizard>
%]
#include "stdafx.h"

#using <mscorlib.dll>

using namespace System;
using namespace System::Collections;

public __gc class [%<variable type="standard" name="filenamebase"/>%] : public DictionaryBase
{
public:
	__property [%<variable type="custom" name="value_datatype"/>%] get_Item( [%<variable type="custom" name="key_datatype"/>%] key )
	{
		return __try_cast<[%<variable type="custom" name="value_datatype"/>%]>(Dictionary->Item[key]);	// TODO: If [%<variable type="custom" name="key_datatype"/>%] is a value type, then replace "key" with "__box(key)"
		// TODO: If [%<variable type="custom" name="value_datatype"/>%] is a value type, then the line above should start with:
		//return *__try_cast<__box [%<variable type="custom" name="value_datatype"/>%] *>(

	}

	__property void set_Item( [%<variable type="custom" name="key_datatype"/>%] key, [%<variable type="custom" name="value_datatype"/>%] value )
	{
		Dictionary->Item[key] = value;	// TODO: If [%<variable type="custom" name="key_datatype"/>%] is a value type, then replace "key" with "__box(key)"
										// TODO: If [%<variable type="custom" name="value_datatype"/>%] is a value type, then replace "value" with "__box(value)"
	}

	__property ICollection* get_Keys()
	{
		return(Dictionary->Keys);
	}

	__property ICollection* get_Values()
	{
		return(Dictionary->Values);
	}

	void Add( [%<variable type="custom" name="key_datatype"/>%] key, [%<variable type="custom" name="value_datatype"/>%] value ) {
		Dictionary->Add(key, value);	// TODO: If [%<variable type="custom" name="key_datatype"/>%] is a value type, then replace "key" with "__box(key)"
										// TODO: If [%<variable type="custom" name="value_datatype"/>%] is a value type, then replace "value" with "__box(value)"
	}

	bool Contains([%<variable type="custom" name="key_datatype"/>%] key) {
		return(Dictionary->Contains(key));	// TODO: If [%<variable type="custom" name="key_datatype"/>%] is a value type, then replace "key" with "__box(key)"
	}

	void Remove([%<variable type="custom" name="key_datatype"/>%] key) {
		Dictionary->Remove(key);	// TODO: If [%<variable type="custom" name="key_datatype"/>%] is a value type, then replace "key" with "__box(key)"
	}
};
